17. Negative Cups of Coffee
Quiz Intro Video
28q_Negative Number of Cups of Coffee
Side Note: You can put a ‘return’ keyword inside of an if statement, and that that will end the method early. See the highest rated answer in this StackOverflow post.
Hint: Check this guide on how to pop up toast messages in an app.
SOLUTION:
decrementSOLUTION:
- quantity == 1
- quantity < 2
SOLUTION:
incrementSOLUTION:
- quantity>=100
- quantity==100
Solution Video
28s_Negative Number of Cups of Coffee